/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.uccart_project.ui.forms;

import com.uccart_project.controller.Controller_Application;
import com.uccart_project.ui.panels.*;
import java.awt.CardLayout;

/**
 *
 * @author KNO
 */
public class UI_Alumno extends javax.swing.JFrame {

    private Controller_Application controller_Application;
    private UI_Panel_MenuPrincipal uI_Panel_MenuPrincipal;
    private UI_Panel_SeleccionarCurso uI_panel_SeleccionarCurso;
    private UI_Panel_Cobro uI_Panel_Cobro;
    private UI_Panel_EstadoCuenta uI_Panel_EstadoCuenta;
    private UI_Panel_Historial uI_Panel_Historial;
    private UI_Panel_Horario uI_Panel_Horario;
    private UI_Panel_InformacionUsuario uI_Panel_InformacionUsuario;
    

    /**
     * Creates new form UI_Alumno
     */
    public UI_Alumno(Controller_Application controller_Application) {
        initComponents();
        this.controller_Application = controller_Application;
        this.uI_Panel_MenuPrincipal = new UI_Panel_MenuPrincipal(controller_Application);
        this.uI_panel_SeleccionarCurso = new UI_Panel_SeleccionarCurso(controller_Application);
//        this.uI_Panel_Cobro = new UI_Panel_Cobro(controller_Application);
//        this.uI_Panel_EstadoCuenta = new UI_Panel_EstadoCuenta(controller_Application);
//        this.uI_Panel_Historial = new UI_Panel_Historial(controller_Application);
//        this.uI_Panel_Horario = new UI_Panel_Horario(controller_Application);
        this.uI_Panel_InformacionUsuario = new UI_Panel_InformacionUsuario(controller_Application);

        card.setLayout(new CardLayout());
        card.add(uI_Panel_MenuPrincipal, Controller_Application.PANEL_PRINCIPAL);
        card.add(uI_panel_SeleccionarCurso, Controller_Application.PANEL_SELECCION_CURSO);
//        card.add(uI_Panel_Cobro, Controller_Application.PANEL_COBRO);
//        card.add(uI_Panel_EstadoCuenta, Controller_Application.PANEL_ESTADO_CUENTA);
//        card.add(uI_Panel_Historial, Controller_Application.PANEL_HISTORIAL);
//        card.add(uI_Panel_Horario, Controller_Application.PANEL_HORARIO);
        card.add(uI_Panel_InformacionUsuario, Controller_Application.PANEL_INFORMACION);
        CardLayout cl = (CardLayout) (card.getLayout());
        cl.show(card,  Controller_Application.PANEL_PRINCIPAL);
    }

    public void cambiarPanel(String panelName) {
        System.out.println("\n cambiar panel: "+panelName);
        CardLayout cl = (CardLayout) (card.getLayout());
        cl.show(card, panelName);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        card = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(710, 510));
        setPreferredSize(new java.awt.Dimension(710, 510));

        card.setMinimumSize(new java.awt.Dimension(700, 480));

        javax.swing.GroupLayout cardLayout = new javax.swing.GroupLayout(card);
        card.setLayout(cardLayout);
        cardLayout.setHorizontalGroup(
            cardLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 700, Short.MAX_VALUE)
        );
        cardLayout.setVerticalGroup(
            cardLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 494, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(card, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(card, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(UI_Alumno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(UI_Alumno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(UI_Alumno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(UI_Alumno.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new UI_Alumno(new Controller_Application()).setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel card;
    // End of variables declaration//GEN-END:variables
}
